import request from '@/utils/request'

export const booksList = (params: any) => {
  return request({
    method: 'get',
    url: '/api/mini-library/books/list',
    params,
  })
}

export const bookEdit = (data: any) => {
  return request({
    method: 'put',
    url: '/api/mini-library/books/',
    data,
  })
}

export const bookDelete = (data: any) => {
  return request({
    method: 'delete',
    url: `/api/mini-library/books/${data}`,
  })
}

export const bookAdd = (data: any) => {
  return request({
    method: 'post',
    url: '/api/mini-library/books/',
    data,
  })
}
